#include<iostream>
#include<string>
using namespace std;
int main()
{
	string s;
	cin >> s;
	long long cnt = 0;
	long long ret = 0;
	for (int i = 0;i < s.size() - 1;i++)
	{
		if (s[i] != '-')
		{
			ret += (s[i]-'0') * (++cnt);
		}
	}
	ret %= 11;
	if (ret== 10 && s.back() == 'X') cout << "Right" << endl;
	else if (ret+'0' == s.back()) cout << "Right" << endl;
	else
	{
		s.pop_back();

	
		char tmp = ret + '0';
		if (ret == 10)
		{
			tmp= 'X';
		}
		string t = s +=tmp;
		cout << t << endl;
	}
	
	return 0;
}